/// <reference types='./globals.d.ts' />
/* tslint:disable */
/* eslint-disable */
/**
 * My Mall API - 购物商城接口定义
 *
 * 这是一个购物商城的API接口定义文件，包含了商品、用户、订单、购物车等核心功能的接口。
 * 
 * 主要功能模块：
 * - 商品管理：商品列表、详情、搜索、分类等
 * - 用户管理：注册、登录、个人信息等
 * - 购物车：添加、删除、修改商品
 * - 订单管理：下单、支付、查询、取消等
 * - 地址管理：收货地址的增删改查
 * - 评价管理：商品评价和回复
 *
 * NOTE: 这个文件定义了购物商城的API路由映射
 *
 * **请根据实际后端接口进行调整**
 */
export default {
  // 商品相关接口
  'product.getProductList': ['GET', '/api/products'],
  'product.getProductById': ['GET', '/api/products/{productId}'],
  'product.getProductsByCategory': ['GET', '/api/products/category/{categoryId}'],
  'product.searchProducts': ['GET', '/api/products/search'],
  'product.getHotProducts': ['GET', '/api/products/hot'],
  'product.getRecommendProducts': ['GET', '/api/products/recommend'],
  
  // 商品分类接口
  'category.getCategoryList': ['GET', '/api/categories'],
  'category.getCategoryById': ['GET', '/api/categories/{categoryId}'],
  'category.getCategoryTree': ['GET', '/api/categories/tree'],
  
  // 商品品牌接口
  'brand.getBrandList': ['GET', '/api/brands'],
  'brand.getBrandById': ['GET', '/api/brands/{brandId}'],
  
  // 用户相关接口
  'user.register': ['POST', '/api/user/register'],
  'user.login': ['POST', '/api/user/login'],
  'user.logout': ['POST', '/api/user/logout'],
  'user.getUserInfo': ['GET', '/api/user/info'],
  'user.updateUserInfo': ['PUT', '/api/user/info'],
  'user.changePassword': ['PUT', '/api/user/password'],
  'user.uploadAvatar': ['POST', '/api/user/avatar'],
  
  // 购物车相关接口
  'cart.getCartList': ['GET', '/api/cart'],
  'cart.addToCart': ['POST', '/api/cart'],
  'cart.updateCartItem': ['PUT', '/api/cart/{itemId}'],
  'cart.removeCartItem': ['DELETE', '/api/cart/{itemId}'],
  'cart.clearCart': ['DELETE', '/api/cart'],
  'cart.selectCartItem': ['PUT', '/api/cart/{itemId}/select'],
  'cart.selectAllCartItems': ['PUT', '/api/cart/select-all'],
  
  // 订单相关接口
  'order.createOrder': ['POST', '/api/orders'],
  'order.getOrderList': ['GET', '/api/orders'],
  'order.getOrderById': ['GET', '/api/orders/{orderId}'],
  'order.cancelOrder': ['PUT', '/api/orders/{orderId}/cancel'],
  'order.confirmOrder': ['PUT', '/api/orders/{orderId}/confirm'],
  'order.deleteOrder': ['DELETE', '/api/orders/{orderId}'],
  'order.payOrder': ['POST', '/api/orders/{orderId}/pay'],
  
  // 收货地址相关接口
  'address.getAddressList': ['GET', '/api/addresses'],
  'address.getAddressById': ['GET', '/api/addresses/{addressId}'],
  'address.createAddress': ['POST', '/api/addresses'],
  'address.updateAddress': ['PUT', '/api/addresses/{addressId}'],
  'address.deleteAddress': ['DELETE', '/api/addresses/{addressId}'],
  'address.setDefaultAddress': ['PUT', '/api/addresses/{addressId}/default'],
  
  // 商品评价相关接口
  'review.getReviewList': ['GET', '/api/reviews'],
  'review.getProductReviews': ['GET', '/api/products/{productId}/reviews'],
  'review.createReview': ['POST', '/api/reviews'],
  'review.updateReview': ['PUT', '/api/reviews/{reviewId}'],
  'review.deleteReview': ['DELETE', '/api/reviews/{reviewId}'],
  
  // 优惠券相关接口
  'coupon.getCouponList': ['GET', '/api/coupons'],
  'coupon.getMyCoupons': ['GET', '/api/user/coupons'],
  'coupon.receiveCoupon': ['POST', '/api/coupons/{couponId}/receive'],
  'coupon.getAvailableCoupons': ['GET', '/api/coupons/available'],
  
  // 轮播图和公告接口
  'banner.getBannerList': ['GET', '/api/banners'],
  'notice.getNoticeList': ['GET', '/api/notices'],
  
  // 搜索相关接口
  'search.getHotKeywords': ['GET', '/api/search/hot'],
  'search.getSearchHistory': ['GET', '/api/search/history'],
  'search.saveSearchHistory': ['POST', '/api/search/history'],
  'search.clearSearchHistory': ['DELETE', '/api/search/history'],
  
  // 收藏相关接口
  'favorite.getFavoriteList': ['GET', '/api/favorites'],
  'favorite.addToFavorite': ['POST', '/api/favorites'],
  'favorite.removeFromFavorite': ['DELETE', '/api/favorites/{productId}'],
  'favorite.checkFavorite': ['GET', '/api/favorites/{productId}/check'],
  
  // 物流相关接口
  'logistics.getLogisticsInfo': ['GET', '/api/logistics/{orderId}'],
  
  // 客服相关接口
  'service.getServiceList': ['GET', '/api/service/list'],
  'service.createServiceTicket': ['POST', '/api/service/ticket'],
};
